﻿<%@ Page Title="Page de profil" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="Twittit.Web.Profile" %>

<%@ Register Assembly="FreshClickmedia.Web" Namespace="FreshClickMedia.Web.UI.WebControls"
    TagPrefix="fcm" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<div id="leftpan">
    <div id="userTwitts">
        <asp:Repeater runat="server" ID="UserTwittsRepeater" >
            <ItemTemplate>
            <div class="twitt">
				<span class="avatar">
                    <fcm:Gravatar ID="repeaterGravatar" size="50" runat="server" Email=<%# Eval("User.email") %> OutputGravatarSiteLink="false"/>
                </span>						
				<span class="author"><%# Eval("User") %></span>
				<span class="content"><%# Eval("mixed") %>	</span>						
				<span class="date"><%# DataBinder.Eval(Container.DataItem, "date", "{0:d}")  %></span>
			</div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</div> 
<div id="rightpan">
    <div id="profile">
        <div class="avatar">
            <fcm:Gravatar ID="UserGravatar" runat="server" OutputGravatarSiteLink="false"/>
        </div>
        <span class="hometext">        
            <span class="username"><asp:Label ID="TitleLabel" runat="server"></asp:Label></span>
            <span class="about"><asp:Label ID="AboutLabel" runat="server" ></asp:Label></span>
            <% if (Session["username"] != null && Session["username"].ToString().ToLower() != TitleLabel.Text.ToLower())
               { %>
            <span class="follow">
                
                <a href="#" class="subscribeajax button"><asp:Literal ID="SubscriptionLiteral" runat="server"></asp:Literal></a><span class="hidden userid">
                
                <asp:Literal id="userIdFollow" runat="server"></asp:Literal></span>
                <span class="subscriptionstatus"><asp:Literal id="SubscriptionStatusLiteral" runat="server"></asp:Literal></span>
            </span>
            <% } %>
        </span>
        <table>
        <tr>
            <td>Type de profil</td>
            <td id="typeProfilTd">
                <asp:Label ID="UserConfirmLabel" runat="server" />
                <asp:CheckBox ID="PrivacyCheckBox" runat="server" Text="Privé"/>
            </td>
        </tr>					
		<tr>
            <td>Nom et prénom</td>
            <td id="NameTd">
                <asp:Label Id="UserIDLabel" runat="server" Visible="false" ></asp:Label>
                <asp:Label ID="NameLabel" runat="server" ></asp:Label>
                <asp:TextBox ID="NameTextBox" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Twittit</td>
            <td id="TwittitTd">
                <asp:Label ID="TwittitLabel" runat="server" ></asp:Label>
                <asp:TextBox ID="TwittitTextBox" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Adresse mail</td>
            <td id="MailTd">
                <asp:Label ID="MailLabel" runat="server" ></asp:Label>
                <asp:TextBox ID="MailTextBox" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Site Web</td>
            <td id="WebsiteTd">
                <asp:Label ID="WebsiteLabel" runat="server" ></asp:Label>
                <asp:TextBox ID="WebsiteTextBox" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Localisation</td>
            <td id="LocalisationTd">
                <asp:Label ID="LocalisationLabel" runat="server" ></asp:Label>
                <asp:TextBox ID="LocalisationTextBox" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>A propos de vous</td>
            <td id="AboutTd">                
                <asp:TextBox TextMode="MultiLine" MaxLength="140" ID="AboutTextBox" runat="server" ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>Date d'inscription</td>
            <td id="inDateTd">
                <asp:Label ID="inDateLabel" runat="server" ></asp:Label>
            </td>
        </tr>
        <tr>
            <td>Connecté à Twitter</td>
            <td id="Td1">
                <asp:Label ID="TwitterConnectionLabel" runat="server" />
                <asp:CheckBox ID="TwitterConnectionCheckbox" runat="server" Text="Connecter"/>
            </td>
        </tr>	
        <% if (Session["username"] != null) { %>
        <tr>
            <td><asp:Button Id="ModifyProfileButton" Text="Modifier" runat="server"></asp:Button></td>
            <td><asp:Button ID="SubmitProfileButton" Text="Enregistrer" runat="server" onclick="SubmitProfileButton_Click"></asp:Button></td>
        </tr>
        <% } %>
	</table>
    <div id="follow">
		<div class="activity">
		    <div class="item"><span class="title"><a href="Follow.aspx?user=<%= UserIDLabel.Text %>">Abonnements</a></span><span class="value"><asp:Literal ID="literalUsername1" runat="server"></asp:Literal> suit <asp:Literal ID="SubscribedCount" runat="server"></asp:Literal> Twittiter(s)</span></div>
		    <div class="item"><span class="title"><a href="Follow.aspx?user=<%= UserIDLabel.Text %>">Abonnés</a></span><span><asp:Literal ID="literalUsername2" runat="server"></asp:Literal> est suvi par <asp:Literal ID="SubscribersCount" runat="server"></asp:Literal> Twittiters</span></div>
        </div>
    </div>			
</div>
</div>
</asp:Content>